package com.diandi.activity.mapper;

import com.diandi.activity.bean.LotteryTicket;
import com.diandi.ddsb.bean.TicketUseDetail;
import com.diandi.ddsb.vo.LotteryTicketInfoVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by a on 2018/3/27.
 */
@Repository
public interface CenterLotteryTicketMapper {

    /**
     * 获取奖券列表
     *
     */
    public List<LotteryTicket> queryLotteryTickets(Map paramMap);

    /**
     * 查询符合条件的奖券数量
     */
    public Integer queryLotteryTicketCount(Map paramMap);

    public Integer checkLotteryTicketTitle(@Param(value = "title") String title);

    public Long insertLotteryTicket(LotteryTicket LotteryTicket);

    public LotteryTicketInfoVo getLotteryTicketById(@Param(value = "id") Long id);

    /**
     * 批量插入
     *
     * @param details
     * @return
     */
    public int inserTicketUseDetails(List<TicketUseDetail> details);

    public int updateLotteryTicket(LotteryTicket lotteryTicket);

    public List<LotteryTicket> queryTicketCombox();

    public LotteryTicketInfoVo getTicketByOldId(@Param(value = "id") Long id);

}
